package com.beamfield.dao.lab;

import com.beamfield.model.ConcreteOpening;
import com.beamfield.modelVo.ConcreteOpeningVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface ConcreteOpeningMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ConcreteOpening record);

    int insertSelective(ConcreteOpening record);

    ConcreteOpening selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ConcreteOpening record);

    int updateByPrimaryKey(ConcreteOpening record);

    List<ConcreteOpening> selectAll(@Param("beamId") Long beamId, @Param("offset") long offset, @Param("limit") int limit, @Param("noticeId")String noticeId, @Param("partDate") String partDate);

    int selectAllCount(@Param("beamId") Long beamId, @Param("noticeId")String noticeId, @Param("partDate") String partDate);

    List<ConcreteOpening> selectByNoticeId(@Param("noticeId") Long noticeId);

    List<ConcreteOpeningVo> selectPage(@Param("beamId") Long beamId, @Param("offset") String offset, @Param("limit") String limit,@Param("noticeId") String noticeId);

    long countPage(@Param("beamId") Long beamId, @Param("noticeId") String noticeId);

    List<ConcreteOpening> getWaitList(@Param("offset")Integer offset, @Param("limit")Integer limit,
                                @Param("beam_no")String beam_no, @Param("depart")String depart, @Param("time")String time,
                                @Param("beam_id")Long beam_id);

    int getWaitCount(@Param("beam_no")String beam_no, @Param("depart")String depart, @Param("time")String time, @Param("beam_id")Long beam_id);

    List<ConcreteOpening> getHistoryList(@Param("offset")Integer offset, @Param("limit")Integer limit,
                                   @Param("beam_no")String beam_no, @Param("depart")String depart, @Param("time")String time,
                                   @Param("beam_id")Long beam_id);

    int getHistoryCount(@Param("beam_no")String beam_no, @Param("depart")String depart, @Param("time")String time, @Param("beam_id")Long beam_id);

    List<String> getPart(Long beamId);
}
